<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    import="java.util.*,com.beans.*,com.DAO.*;"  pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Add user</title>

</head>
<body>

<div id ="adduser">

<div class = "categorytitle">
	Add user
</div>
<center>
	<form action="AddUserForm.do" method="post">
<table>
<tr>
<td>Email Id:</td>
<td><input type="text" name="userId"/></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="password"/></td>
</tr>
<tr>
<td>Confirm Password:</td>
<td><input type="password" name="password"/></td>
</tr>
<tr>
<td>User Name:</td>
<td><input type="text" name="userName"/></td>
</tr>
<tr>
<td>Date of birth:</td>
<td><input type="text" name="birthDate"/></td>
</tr>
</table>
<input id = "btnsubmit" type="submit" value="Add" name="insert" />
</form>
</center>
</div>

<div id="updateuser">
<div class = "categorytitle">
	Delete User
</div>
<center>

<table>
<tr>

<th>User Id</th>
<th>Password</th>
<th>User Name</th>
<th>Birth Date</th>
<th></th>
</tr>


<%ArrayList<UserForm> ulist=new ArrayList<UserForm>();
String id1;
%>
<%UserDAO userDao=new UserDAO(); %>
<%
 	ulist=userDao.get();
	for(UserForm userForm:ulist)
	{
		id1=userForm.getUserId();
		
		
%>

<tr>
<td><%=userForm.getUserId()%>
</td>
<td><%=userForm.getPassword()%>
</td>

<td><%=userForm.getUserName()%>
</td>

<td><%=userForm.getBirthDate()%>
</td>

<td><a href="DeleteUserAction.do?id=<%=id1%>">Delete</a></td>

</tr>

<%} %>

</table>
</center>
</div>

</body>
</html>